package api

import (
	"comment-video/api/handler"
	"github.com/gin-gonic/gin"
)

func LoadRouter(r *gin.Engine) {
	api := r.Group("/api")
	{
		user := api.POST("/user")
		{
			user.POST("register", handler.RegisterUser)
			user.POST("login", handler.LoginUser)
			user.POST("logout", handler.LogoutUser)
		}

		comment := api.POST("/comment")
		{
			comment.POST("add", handler.AddComment)
			comment.POST("deleted", handler.DeletedComment)
			comment.GET("show", handler.ShowComment)
			comment.GET("findByAuth", handler.FindByAuthComment)
			comment.GET("List", handler.ListComment)
		}

	}
}
